/**
 * Created by 游永年 on 2019-01-23 15:29.
 *商品详情页
 */

'use strict'
import React, {Component} from 'react';
import {connect} from 'dva';
import Product from "../../components/Product/Product";
import {Button, Card} from "antd-mobile";
import Full from "../../components/layout/Full";

class PContent extends Component {
  render() {
    return (<Full>
      <Product classInfShow={false} priceShow={false}/>
      <Card full>
        <Card.Body>
          <div>荣誉展示</div>
        </Card.Body>
      </Card>
      <Card full>
        <Card.Body>
          <div>自我介绍</div>
        </Card.Body>
      </Card>
      <div>
        <Button type={'primary'} onClick={this.book}>预约家教</Button>
        {/*<Button type={'primary'}>报名</Button>*/}
      </div>
    </Full>);
  }

  book = _ => this.props.dispatch({type: 'product/book'});
};

PContent.propTypes = {};

const opts = ({product}) => {
  const {isBook = false} = product || {};
  return {isBook};
}
export default connect(opts)(PContent);
